﻿@{
    ViewBag.Title = "编辑短信模板";
}
@model DTcms.Model.sms_template
<form id="form1" class="layui-form" url="SmsTemplateSave?action=@ViewBag.action&id=@ViewBag.id">
    @Html.AntiForgeryToken()
    <!--导航栏-->
    <div class="pageheader">
        <div class="page-bar">
            <ul class="page-breadcrumb">
                <li><a href="../users/sms_template_list" class="back"><i class="fa fa-mail-reply-all"></i> 返回列表页</a></li>
                <li><a href="javascript:;"><i class="iconfont icon-home1"></i> 首页</a> </li>
                <li><a href="javascript:;">会员设置</a> </li>
                <li><a href="javascript:;">编辑短信内容</a> </li>
            </ul>
        </div>
    </div>
    <!--/导航栏-->
    <!--内容-->
    <div class="layui-fluid">
        <div class="layui-tab layui-tab-card">
            <ul class="layui-tab-title" id="floatHead">
                <li class="layui-this">编辑短信内容</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <div class="layui-form-item">
                        <label class="layui-form-label">模板标题</label>
                        <div class="layui-input-block">
                            @Html.TextBox("title", Model.title, new { @class = "input normal", datatype = "*1-100", sucmsg = " " })
                            <span class="Validform_checktip">*标题名称，100字符内</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">调用别名</label>
                        <div class="layui-input-block">
                            @Html.TextBox("call_index", Model.call_index, new { @class = "input normal", datatype = "s0-50", sucmsg = " " })
                            <span class="Validform_checktip">程序调用的别名，50字符内</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">模板ID</label>
                        <div class="layui-input-block">
                            @Html.TextBox("templateId", Model.templateId, new { @class = "input normal", datatype = "s0-50", sucmsg = " " })
                            <span class="Validform_checktip"></span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">短信内容</label>
                        <div class="layui-input-block">
                            @Html.TextArea("content", Model.content, new { @class = "input normal" })
                            <span class="Validform_checktip">*发送短信的内容，不支持HTML</span>
                        </div>
                        <div class="layui-input-block">
                            <p>阿里云采用Json格式：{"username":"{username}","webname":"{webname}"}  需要模板ID</p>
                            <p>云通讯采用数组 数据格式：{username},{webname} 后台自动分割   需要模板ID</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--/内容-->
    <!--工具栏-->
    <div class="page-footer">
        <div class="btn-wrap">
            <button class="layui-btn icon-btn" id="btnSubmit"><i class="layui-icon layui-icon-ok"></i>提交保存</button>
            <button class="layui-btn layui-btn-warm icon-btn" name="btnReturn" onclick="javascript:history.back(-1);"><i class="layui-icon layui-icon-return"></i>返回上一页</button>
        </div>
    </div>
    <!--/工具栏-->
</form>
@section Scripts{
    <script type="text/javascript">
        layui.use(['jqueryform', 'validform', 'element'], function () {
            //初始化表单验证
            $("#form1").initValidform('#btnSubmit', 1);
        });
    </script>
}